def selection_sort(nums: list[int]) -> None:
    i = 0 # 已排序
    while i < len(nums):
        min_elem = min(nums[i:])
        min_index = nums[i:].index(min_elem) + i
        nums[i], nums[min_index] = nums[min_index], nums[i]
        i += 1
    return nums


if __name__ == '__main__':
    print(selection_sort([5, 16, 99, 12, 567, 23, 15, 72, 3]))
    print(selection_sort([1, 4, 2, 8, 345, 123, 43, 32, 5643, 63, 123, 43, 2, 55, 1, 234, 92]))
